home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpconvert.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  6.4 KB  |  153 lines

  1. <refentry id="libgimp-gimpconvert" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpconvert</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpconvert</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-convert-rgb">gimp_convert_rgb</link>                (<link linkend="gint32">gint32</link> image_ID);
  18. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-convert-grayscale">gimp_convert_grayscale</link>          (<link linkend="gint32">gint32</link> image_ID);
  19. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-convert-indexed">gimp_convert_indexed</link>            (<link linkend="gint32">gint32</link> image_ID,
  20.                                              <link linkend="GimpConvertDitherType">GimpConvertDitherType</link> dither_type,
  21.                                              <link linkend="GimpConvertPaletteType">GimpConvertPaletteType</link> palette_type,
  22.                                              <link linkend="gint">gint</link> num_cols,
  23.                                              <link linkend="gboolean">gboolean</link> alpha_dither,
  24.                                              <link linkend="gboolean">gboolean</link> remove_unused,
  25.                                              <link linkend="gchar">gchar</link> *palette);
  26. </synopsis>
  27. </refsynopsisdiv>
  28.  
  29.  
  30.  
  31.  
  32.  
  33. <refsect1>
  34. <title>Description</title>
  35. <para>
  36.  
  37. </para>
  38. </refsect1>
  39.  
  40. <refsect1>
  41. <title>Details</title>
  42. <refsect2>
  43. <title><anchor id="gimp-convert-rgb">gimp_convert_rgb ()</title>
  44. <programlisting><link linkend="gboolean">gboolean</link>    gimp_convert_rgb                (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  45. <para>
  46. Convert specified image to RGB color
  47. </para>
  48. <para>
  49. This procedure converts the specified image to RGB color. This
  50. process requires an image of type GRAY or INDEXED. No image content
  51. is lost in this process aside from the colormap for an indexed
  52. image.</para>
  53. <para>
  54.  
  55. </para><informaltable pgwide=1 frame="none" role="params">
  56. <tgroup cols="2">
  57. <colspec colwidth="2*">
  58. <colspec colwidth="8*">
  59. <tbody>
  60. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  61. <entry> The image.
  62. </entry></row>
  63. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  64. </entry></row>
  65. </tbody></tgroup></informaltable></refsect2>
  66. <refsect2>
  67. <title><anchor id="gimp-convert-grayscale">gimp_convert_grayscale ()</title>
  68. <programlisting><link linkend="gboolean">gboolean</link>    gimp_convert_grayscale          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  69. <para>
  70. Convert specified image to grayscale (256 intensity levels)
  71. </para>
  72. <para>
  73. This procedure converts the specified image to grayscale with 8 bits
  74. per pixel (256 intensity levels). This process requires an image of
  75. type RGB or INDEXED.</para>
  76. <para>
  77.  
  78. </para><informaltable pgwide=1 frame="none" role="params">
  79. <tgroup cols="2">
  80. <colspec colwidth="2*">
  81. <colspec colwidth="8*">
  82. <tbody>
  83. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  84. <entry> The image.
  85. </entry></row>
  86. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  87. </entry></row>
  88. </tbody></tgroup></informaltable></refsect2>
  89. <refsect2>
  90. <title><anchor id="gimp-convert-indexed">gimp_convert_indexed ()</title>
  91. <programlisting><link linkend="gboolean">gboolean</link>    gimp_convert_indexed            (<link linkend="gint32">gint32</link> image_ID,
  92.                                              <link linkend="GimpConvertDitherType">GimpConvertDitherType</link> dither_type,
  93.                                              <link linkend="GimpConvertPaletteType">GimpConvertPaletteType</link> palette_type,
  94.                                              <link linkend="gint">gint</link> num_cols,
  95.                                              <link linkend="gboolean">gboolean</link> alpha_dither,
  96.                                              <link linkend="gboolean">gboolean</link> remove_unused,
  97.                                              <link linkend="gchar">gchar</link> *palette);</programlisting>
  98. <para>
  99. Convert specified image to and Indexed image
  100. </para>
  101. <para>
  102. This procedure converts the specified image to 'indexed' color. This
  103. process requires an image of type GRAY or RGB. The 'palette_type'
  104. specifies what kind of palette to use, A type of '0' means to use an
  105. optimal palette of 'num_cols' generated from the colors in the
  106. image. A type of '1' means to re-use the previous palette (not
  107. currently implemented). A type of '2' means to use the so-called
  108. WWW-optimized palette. Type '3' means to use only black and white
  109. colors. A type of '4' means to use a palette from the gimp palettes
  110. directories. The 'dither type' specifies what kind of dithering to
  111. use. '0' means no dithering, '1' means standard Floyd-Steinberg
  112. error diffusion, '2' means Floyd-Steinberg error diffusion with
  113. reduced bleeding, '3' means dithering based on pixel location
  114. ('Fixed' dithering).</para>
  115. <para>
  116.  
  117. </para><informaltable pgwide=1 frame="none" role="params">
  118. <tgroup cols="2">
  119. <colspec colwidth="2*">
  120. <colspec colwidth="8*">
  121. <tbody>
  122. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  123. <entry> The image.
  124. </entry></row>
  125. <row><entry align="right"><parameter>dither_type</parameter> :</entry>
  126. <entry> dither type (0=none, 1=fs, 2=fs/low-bleed 3=fixed).
  127. </entry></row>
  128. <row><entry align="right"><parameter>palette_type</parameter> :</entry>
  129. <entry> The type of palette to use.
  130. </entry></row>
  131. <row><entry align="right"><parameter>num_cols</parameter> :</entry>
  132. <entry> the number of colors to quantize to, ignored unless (palette_type == MAKE_PALETTE).
  133. </entry></row>
  134. <row><entry align="right"><parameter>alpha_dither</parameter> :</entry>
  135. <entry> dither transparency to fake partial opacity.
  136. </entry></row>
  137. <row><entry align="right"><parameter>remove_unused</parameter> :</entry>
  138. <entry> remove unused or duplicate colour entries from final palette, ignored if (palette_type == MAKE_PALETTE).
  139. </entry></row>
  140. <row><entry align="right"><parameter>palette</parameter> :</entry>
  141. <entry> The name of the custom palette to use, ignored unless (palette_type == CUSTOM_PALETTE).
  142. </entry></row>
  143. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  144. </entry></row>
  145. </tbody></tgroup></informaltable></refsect2>
  146.  
  147. </refsect1>
  148.  
  149.  
  150.  
  151.  
  152. </refentry>
  153.